package mathive.server.persistant;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class SudokuData {

	public static final int EASY = 0;
	public static final int MEDIUM = 1;
	public static final int HARD = 2;
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private int id;	

	@Persistent
	private String sudoku;
	
	@Persistent
	private int difficulty;

	public SudokuData(int id, String sudoku, int difficulty){
		this.id = id;
		this.sudoku = sudoku;
		this.difficulty = difficulty;
	}

	public int getId(){
		return id;
	}
	
	public String getSudoku(){
		return sudoku;
	}
	
	public int getDifficulty(){
		return difficulty;
	}
	
	public String getString(){
		return id + " " + sudoku + " " + difficulty;
	}
	
}